package org.will.aop.t4;

import lombok.extern.slf4j.Slf4j;

import java.lang.reflect.Method;

@Slf4j
public class UserServiceInvocationHandler implements MyInvocationHandler {

    private Object obj;

    public UserServiceInvocationHandler(Object obj) {
        this.obj = obj;
    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        log.info("代理前");
        method.invoke(obj, args);
        log.info("代理后");
        return null;
    }
}
